package com.github.admin.edu.security.jwt.common.service;

import java.io.Serializable;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-7-18
 */
public class JWTInfo implements Serializable,JWTInformation {

    private String userId;
    private String name;
    public JWTInfo(String userId, String name) {
        this.userId = userId;
        this.name = name;
    }


    @Override
    public String getId() {
        return userId;
    }

    @Override
    public String getName() {
        return name;
    }


    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        JWTInfo jwtInfo = (JWTInfo) o;


        return userId != null ? userId.equals(jwtInfo.userId) : jwtInfo.userId == null;

    }

}
